<?php
// 载入库文件
require_once("./lib/IniParser.php");

session_start();
if (isset($_SESSION['JoomlaIniTranslator']) && $_SESSION['JoomlaIniTranslator'] instanceof IniParser) {
	$ip = $_SESSION['JoomlaIniTranslator'];
	if ($ip->translateNextFile() === true) {
		echo "success";
	}
} else {
	$sourceLanguageCode = "en-GB";
	$targetLanguageCode = "zh-CN";
	$languageDirectory = "./inifiles";
	$ip = new IniParser($sourceLanguageCode, $targetLanguageCode, $languageDirectory);
	$ip->init();
}
?>